'use strict';

const Controller = require('egg').Controller;

class ClassController extends Controller {
  async index(){
    var data = await this.ctx.service.class.get();
    this.ctx.body = data
  }
  async create(){
    var data = await this.ctx.service.class.create(); 
    this.ctx.body = data
  }
  async update(){
    var data = await this.ctx.service.class.update();
    this.ctx.body = data;
  }
  async destroy(){
    var data = await this.ctx.service.class.destroy();
    this.ctx.body = data;
  }
}

module.exports = ClassController;
